package cn.wolfcode.rbac.mapper.system_manage;

import cn.wolfcode.rbac.domain.Department;
import cn.wolfcode.rbac.domain.Employee;
import cn.wolfcode.rbac.query.QueryEm;
import cn.wolfcode.rbac.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    /**
     * 分页方法
     * @Author Cao Zhijian
     * @Creed: Talk is cheap,show me the code
     * @Created: 2020/12/25 0025 10:00
     * @param queryObject :
     * @return : java.util.List<cn.wolfcode.rbac.domain.Department>
     */
    List<Employee> selectForList(QueryObject queryObject);

    /**
     * 查询数据库中有多少条数据
     * @Author Cao Zhijian
     * @Creed: Talk is cheap,show me the code
     * @Created: 2020/12/25 0025 10:01
     * @return : int
     */
    int selectForCount();

    void insertRoleAndEmployeeRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

    void deleteRoleAndEmployeeRelation(Long id);

    Employee selectByusernameAndpassword(@Param("username") String username, @Param("password") String password);

// -----------
    List<Department> getAllDepartment();

    List<Employee> selectEmList(String... var1);

    void deleteBatch(Long[] var1);
    void insertRelation(@Param("eid") Long var1, @Param("rid") Long var2);
    List<Employee> selectForList2(QueryEm queryEm);
}